<template>
  <div class="business-card">
    <!-- 商机名称/商机类型 -->
    <div class="business-card_type">
      <bob-label labelText="融资"></bob-label>
      <span>2024年轮胎吊国产发动机更新改造</span>
    </div>
    <!-- 公司 -->
    <div class="business-card_company">徐工集团</div>
    <!-- 地址/发布时间 -->
    <div class="business-card_info">
      <div>
        <span>
          <van-icon name="location-o" />
        </span>
        <span>浙江-杭州</span>
      </div>
      <div>1天前发布</div>
    </div>
    <!-- 分割线 -->
    <van-divider />
    <!-- 剩余天数及发送意向 -->
    <div class="business-card_btn">
      <div class="remaining">
        <span>剩余</span>
        <span class="day">10</span>
        <span>天</span>
      </div>
      <van-button type="primary" class="button" @click="btnClick"
        >发送意向</van-button
      >
    </div>
  </div>
</template>
<script lang="ts" setup>
import { useRouter } from "vue-router";
const router = useRouter();
const btnClick = (event) => {
  event.stopPropagation();
  router.push({ path: "/businessPool/details", query: { type: "intention" } });
};
</script>
<style lang="scss" scoped>
.business-card {
  height: 150px;
  border-radius: 6px;
  padding: 16px;
  background-color: white;
  margin-bottom: 12px;
  &_type {
    font-size: 17px;
    color: #1d2129;
    span {
      margin-left: 4px;
    }
    margin-bottom: 7px;
  }
  &_company {
    font-size: 13px;
    color: #4e5969;
    margin-bottom: 7px;
  }
  &_info {
    display: flex;
    font-size: 14px;
    justify-content: space-between;
  }
  &_btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    height: 32px;
    .remaining {
      line-height: 12px;
      span {
        font-size: 12px;
      }
      .day {
        font-size: 20px;
        color: var(--van-primary-color);
        margin-left: 3px;
        margin-right: 3px;
      }
    }
    .button {
      width: 88px;
      height: 32px;
      border-radius: 16px;
    }
  }
}
</style>

